import 'dart:ui';

import 'package:fish_redux/fish_redux.dart';
import 'package:www.znpigai.teacher/class_list_page/item/state.dart';
import 'package:www.znpigai.teacher/global_store/state.dart';

import 'item/state.dart';

class StudentListState implements GlobalBaseState, Cloneable<StudentListState> {
  List<StudentState> items = <StudentState>[];
  bool isLoading = false; // 是否正在请求数据中
  int pageIndex = GlobalState.firstPageIndex; // 页面索引
  int pageTotal = 1; // 页面总数
  ClassState klass;

  StudentListState();

  @override
  StudentListState clone() {
    return StudentListState()
      ..klass = klass
      ..items = items
      ..pageIndex = pageIndex
      ..pageTotal = pageTotal
      ..isLoading = isLoading;
  }

  @override
  Color themeColor;

  @override
  Map<String, dynamic> userInfo;
}

StudentListState initState(ClassState args) {
  return StudentListState()..klass = args;
}
